<template>
	<view>
		<view v-for="(item, index) in guess" :key="index" class="commonModule" @click="navToDetailPage(item,0)">
			<view class="title-wrap">
				<text class="module-text1">{{item.title}}</text>
				<text class="module-text2"></text>
				<text class="module-text2"></text>
				<text class="module-text3">￥{{item.price}}</text>
			</view>
			<image class="module-image" :src="item.img||`../../static/errorImage.jpg`"></image>
		</view>
	</view>
</template>

<script>
	import Product from '@/components/product/product2.vue';
	import shoppingCart from '@/components/shoppingCart-Button.vue';
	export default {
		components: {
			Product,
			shoppingCart,
		},
		name: 'recommList2',
		props: {
			//列表
			guess: {
				type: Array,
				default: () => []
			},
		},
		data() {
			return {

			};
		},
		watch: {},
		computed: {},
		methods: {
			//详情
			navToDetailPage(item, typeID) {
				let id = typeID,
					goodsid = item.id;
					debugger
				uni.navigateTo({
					url: `/pages/product/product?id=${id}&goodsid=${goodsid}`
				})
			},
		},
	}
</script>

<style lang="scss">
	
	// 猜你喜欢
	.commonModule {
		position: 20upx;
		margin: 20upx auto;
		height: 256upx;
		width: 720upx;
		display: flex;
		justify-content: space-around;
		align-items: center;
		box-shadow: 0 0 28upx 0 rgba(0, 0, 0, 0.08);
		background: #fff;

		.title-wrap {
			width: 350upx;
			float: left;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-around;

			.module-text1 {
				font-size: 16px;
				color: rgb(51, 51, 51);
				font-weight: bold;
				text-decoration: none;
				line-height: 42upx;
				padding: 20upx;
				width: 100%;
			}

			.module-text2 {
				font-size: 12px;
				color: rgb(128, 128, 128);
				text-decoration: none;
				line-height: 34upx;
				width: 100%;
				padding: 0 20upx;
			}

			.module-text3 {
				font-size: 14px;
				color: rgb(50, 133, 255);
				text-decoration: none;
				line-height: 38upx;
				width: 100%;
				padding: 20upx;
			}
		}

		.module-image {
			vertical-align: top;
			width: 220upx;
			height: 174upx;
		}
	}
</style>
